package com.woniu.controller;

import com.woniu.entity.InpatientRecord;
import com.woniu.service.InpatientRecordService;
import com.woniu.utils.ResponseUtil;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inpatientRecord")
public class InpatientRecordController {
    @Resource
    private InpatientRecordService inpatientRecordService;
    //添加住院记录
    @PostMapping
    public ResponseUtil addRecord(@RequestBody InpatientRecord inpatientRecord){
        ResponseUtil result = inpatientRecordService.addRecord(inpatientRecord);
        return result;
    }

    //查询状态处于已住院的信息
    @GetMapping
    public ResponseUtil recordList(){
        ResponseUtil result = inpatientRecordService.recordList();
        return result;
    }
}
